const names = ["Hole-in-one!", "Eagle", "Birdie", "Par", "Bogey", "Double Bogey", "Go Home!"];

const golfScore = (par, strokes) => {
    let nickname;
    if (strokes === 1) {
        nickname = names[0];
    } else if (strokes <= par - 2) {
        nickname = names[1];
    } else if (strokes === par - 1) {
        nickname = names[2];
    } else if (strokes === par) {
        nickname = names[3];
    } else if (strokes === par + 1) {
        nickname = names[4];
    } else if (strokes === par + 2) {
        nickname = names[5];
    } else if (strokes >= par + 3) {
        nickname = names[6];
    }
    return nickname;
}